package com.zbkj.crmeb.agent.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.crmeb.core.common.CommonResult;
import com.common.PageParamRequest;
import com.github.pagehelper.PageInfo;
import com.zbkj.crmeb.agent.model.Agent;
import com.zbkj.crmeb.agent.request.AddAgentRequest;
import com.zbkj.crmeb.agent.request.AdminAgentRequest;
import com.zbkj.crmeb.agent.request.AgentListRequest;
import com.zbkj.crmeb.agent.request.SettlementRequest;
import com.zbkj.crmeb.agent.response.DropDownAgentsResponse;
import com.zbkj.crmeb.agent.response.SettlementResponse;
import com.zbkj.crmeb.agent.vo.AgentVo;
import com.zbkj.crmeb.enums.StockAreaTempEnum;

import java.util.List;

/**
 * <p>
 * 服务商表 服务类
 * </p>
 *
 * @author wuzp
 * @since 2022-02-15
 */
public interface AgentService extends IService<Agent> {

    CommonResult<String> addAgent(AddAgentRequest request);

    CommonResult<String> updateAgent(AddAgentRequest request);

    CommonResult<String> deleteAgent(Integer id);

    CommonResult<List<DropDownAgentsResponse>> dropDownAgents(Integer level);

    PageInfo<AgentVo> getFinancialAgentList(AgentListRequest request);

    CommonResult<AgentVo> getAgentById(Integer id);

    PageInfo<Agent> getAgentList(PageParamRequest request);

    List<SettlementResponse> settlement(SettlementRequest request);


    /**
     * 管理员服务商下拉框
     * @param request
     * @return
     */
    CommonResult<List<DropDownAgentsResponse>> listDropDownAgents(AdminAgentRequest request);

    /**
     * 查询二级服务商id
     * @param oneAgentIds
     * @return
     */
    List<Integer> listTwoAgentIds(List<Integer> oneAgentIds);

    /**
     * 服务商发货地
     * @param agentId
     * @return
     */
    List<StockAreaTempEnum> getStockArea(Integer agentId);
}
